﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FXnaWpfBase;

using NSCore;


namespace NSPresentation
{
    public class ProjectResultVM:MDTVIViewModel
    {

        public ProjectResultVM(MDTVIViewModel parent,NSResult result)
            : base(parent)



        {


            this._result = result;

            this._result.ResultChanged += new EventHandler(_result_ResultChanged);



            this.LoadChildren();


            this._isShowCheck = false;





        }

        void _result_ResultChanged(object sender, EventArgs e)
        {
            this.Children.Clear();
            this.LoadChildren();

        }



        NSResult _result;



        public override string Desc
        {
            get
            {
                return "计算结果";
            }
        }


        protected override void LoadChildren()
        {
            base.LoadChildren();


            MainGridsResultVM vm = new MainGridsResultVM(this,this._result.MainGrids);

            this.Children.Add(vm);




        }


        public void Refresh()
        {
            this.Children.Clear();

            this.LoadChildren();



        }


    }
}
